package crp.services.api.graphql.models;

import crp.core.resource.domain.models.AttachmentType;
import crp.core.resource.domain.models.ResourceQuery;
import crp.core.resource.domain.models.ResourceQueryScene;
import crp.core.shared.LifecycleStatus;
import crp.core.shared.PublicStatus;
import crp.core.shared.PublishStatus;
import lombok.Getter;
import lombok.Setter;
import org.eclipse.microprofile.graphql.Input;

@Input("ResourceFilterInput")
@Getter
@Setter
public class ResourceFilterInput {
    private String courseId;
    private LifecycleStatus status;
    private PublishStatus publishStatus;
    private PublicStatus publicStatus;
    private AttachmentType attachmentType;
    private ResourceQueryScene scene;

    public ResourceQuery of() {
        return ResourceQuery.builder()
                .courseId(courseId)
                .status(status)
                .publicStatus(publicStatus)
                .publishStatus(publishStatus)
                .attachmentType(attachmentType)
                .scene(scene)
                .build();
    }
}
